Each device connected to the Internet is identified by an IP address, which is a numerical identifier (e.g., 66.192.134.111) that identifies a particular network on the Internet and a particular device. Domain name service (DNS) is used to associate Internet domain names, such as www.xyz-news.com, with an IP address. DNS allows users (clients) to access other devices (hosts) connected to the Internet by using easily remembered domain names rather than IP addresses. In a typical DNS architecture, a user sends a request (termed a DNS query) to access a particular domain name to a name server provided by the user's Internet service provider (ISP). The ISP name server contains a cross-reference between each domain name and the corresponding IP address. The corresponding IP address contained in the ISP name server is typically that of the authoritative name server (ANS) provided by the domain owner. The ANS contains the IP address(es) of the host device(s) provided by the domain owner to supply information or provide services. These host devices may be, for example, web servers, mail servers, or VPN (virtual private network) gateways. The ISP name server sends the DNS query to the domain's ANS. The ANS then returns the appropriate IP address to the ISP name server, which in turn sends the IP address to the client, enabling the client to communicate directly with the host device over the Internet. (The communication between the client and the host device may be termed an application connection.) The ANS is a separate device from the host device(s) providing the information or services to the client.
One domain name may reference several IP addresses, with each IP address corresponding to a different host device. For example, the website www.xyz-news.com may receive a large number of requests for information and may need to communicate with a large number of clients simultaneously. The providers of the www.xyz-news.com domain may use four web servers, each hosting the same information, in order to handle the large amount of communication traffic the domain receives. In such a situation, the ANS may send the IP addresses of the four devices to the ISP name server, and allow the ISP name server to select which one IP address to send to the client. More typically, the ANS will select one of the four IP addresses to send to the ISP's name server, and the ISP name server will send that one address to the client.
The purpose of having multiple devices providing the same information or services may be to effectively handle many application connections by distributing the application connections over the multiple devices. This may be termed load balancing. In order to balance the load across multiple devices, the ANS typically uses a technique to send the IP address of different host devices in response to different DNS queries to prevent one host device from having to handle all the application connections. One known technique of load balancing DNS queries is termed DNS round-robin. In DNS round-robin, the ANS maintains a predefined, static list of the IP addresses of the multiple devices, and cycles through the static list as each successive DNS query is received. For example, consider the example above in which a domain provider uses four devices, with the four devices having the IP addresses 10.0.0.1, 10.0.0.2, 10.0.0.3, and 10.0.0.4, respectively. When the first DNS query is received from the ISP name server, the ANS returns IP address 10.0.0.1. When the second DNS query is received, the ANS returns IP address 10.0.0.2. When the third DNS query is received, the ANS returns IP address 10.0.0.3. When the fourth DNS query is received, the ANS returns IP address 10.0.0.4. When the fifth DNS query is received, the ANS returns IP address 10.0.0.1. The ANS would continue to cycle through this static list of four IP addresses as DNS queries are received.
The DNS round-robin technique performed by a separate ANS has several shortcomings. If one of the devices referenced in the static list becomes unavailable, the ANS would typically continue to return that device's IP address in response to DNS queries, thereby causing a client to attempt to connect with an unavailable device. The static list would need to be manually changed to remove the failed device's IP address. If a new device is added (e.g., to handle an increased number of application connections), the static list would need to be manually changed to add the new device's IP address. The DNS round-robin technique distributes the application connections across the multiple devices, but does not take into account the duration of a particular connection to a particular device or the relative burden a particular connection may place on a particular device. As such, the DNS round-robin technique may not provide sufficient load balancing in some situations. In the example above, if the clients that were provided with the IP address of device 1 quickly retrieved information from device 1 and then terminated the connections, but the clients that were provided with the IP address of device 2 conducted extensive transfers of data, the load on device 2 could greatly exceed the load on device 1. However, the DNS round-robin technique would continue to return the IP address of device 2 for every fourth DNS query, despite the greater load on device 2.
As such, there is a need for a technique to load balance IP traffic across multiple devices that can easily adjust to adding or removing devices and that can dynamically distribute the traffic based on the relative load on each device.